/**
 * 
 */
package com.googlecode.pcapj.bridj;

import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Field;

/**
 * 
	struct sockaddr_in6 {
	  short sin6_family;
	  u_short sin6_port;
	  u_long sin6_flowinfo;
	  struct in6_addr sin6_addr;
	  u_long sin6_scope_id;
	};
 */
public class sockaddr_in6 extends StructObject {
    public sockaddr_in6() { super(); }
    public sockaddr_in6(Pointer<? extends StructObject> pointer) { super(pointer); }

    /**
     * @return
     */
    @Field(0) 
    public short sin6_family() {
            return this.io.getShortField(this, 0);
    }
    /**
     * @param sin_family
     * @return
     */
    @Field(0) 
    public sockaddr_in6 sin6_family(short sin6_family) {
            this.io.setShortField(this, 0, sin6_family);
            return this;
    }
    /**
     * @return
     */
    @Field(1) 
    public short sin6_port() {
            return this.io.getShortField(this, 1);
    }
    @Field(1) 
    public sockaddr_in6 sin6_port(short sin6_port) {
            this.io.setShortField(this, 1, sin6_port);
            return this;
    }
    /**
     * @return
     */
    @Field(2) 
    public in6_addr sin6_flowinfo() {
            return this.io.getNativeObjectField(this, 2);
    }
    @Field(2) 
    public sockaddr_in6 sin6_flowinfo(in6_addr sin6_flowinfo) {
            this.io.setNativeObjectField(this, 2, sin6_flowinfo);
            return this;
    }
    /**
     * @return
     */
    @Field(3) 
    public in6_addr sin6_addr() {
            return this.io.getNativeObjectField(this, 3);
    }
    @Field(3) 
    public sockaddr_in6 sin6_addr(in6_addr sin6_addr) {
            this.io.setNativeObjectField(this, 3, sin6_addr);
            return this;
    }
    /**
     * @return
     */
    @Field(4) 
    public int sin6_scope_id() {
            return this.io.getIntField(this, 4);
    }
    @Field(4) 
    public sockaddr_in6 sin6_scope_id(int sin6_scope_id) {
            this.io.setIntField(this, 4, sin6_scope_id);
            return this;
    }
}
